package com.wzx.common.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "UserToken",description = "token校验用户信息")
public class UserToken implements Serializable {

    @ApiModelProperty(value = "用户ID")
    private Long userId;

    @ApiModelProperty(value = "用户头像")
    private String head;

    @ApiModelProperty(value = "用户名称")
    private String username;

    @ApiModelProperty(value = "用户手机号")
    private String mobile;

    @ApiModelProperty(value = "当前用户的角色")
    private TokenRole role;

    @ApiModelProperty(value = "过期时间")
    private Long expiration;

    @ApiModelProperty(value = "设备信息")
    private String equipmentInfo;

    @ApiModelProperty(value = "设备类型")
    private String deviceType;

    public UserToken(Long userId, String head, String username, String mobile, TokenRole role,String deviceType) {
        this.userId = userId;
        this.head = head;
        this.username = username;
        this.mobile = mobile;
        this.role = role;
        this.deviceType = deviceType;
    }
}